package demo.chain.inter.impl;

import demo.chain.inter.impl.entry.DefaultImplProcessorSlot;
import demo.chain.inter.impl.slot.BlockProcessorSlot;
import demo.chain.inter.impl.slot.FlowProcessorSlot;
import demo.chain.inter.impl.slot.LoggerProcessorSlot;

public class ChainMain {
  public static void main(String[] args) {
    DefaultImplProcessorSlot defaultImplProcessorSlot = new DefaultImplProcessorSlot();
    
    // slot 实例
    BlockProcessorSlot blockProcessorSlot = new BlockProcessorSlot();
    FlowProcessorSlot flowProcessorSlot = new FlowProcessorSlot();
    LoggerProcessorSlot loggerProcessorSlot = new LoggerProcessorSlot();
    
    defaultImplProcessorSlot
        .addLast(blockProcessorSlot)
        .addLast(flowProcessorSlot)
        .addLast(loggerProcessorSlot);
    
    AbstractLinkedProcessorSlot instance = defaultImplProcessorSlot.getInstance();
    instance.entry();
  }
}
